bridge: fix use-after-free bug on bridge member free
authorFelix Fietkau <[email protected]>
Wed, 4 Nov 2020 15:20:14 +0000 (16:20 +0100)
committerFelix Fietkau <[email protected]>
Thu, 5 Nov 2020 11:03:49 +0000 (12:03 +0100)
commitd1e8884f89111726446bdba70ef3a17f84336613
tree8dc03a95007daf6348a8e026190ee9dda82453e3
parenta56e14afa612da95cf989b13a84bdb4e93bdcfee
bridge: fix use-after-free bug on bridge member free

When removing the device reference, the core might free the device.
Use device_lock/unlock to keep the reference valid until it is no longer needed

Signed-off-by: Felix Fietkau <[email protected]>
bridge.c